home *** CD-ROM | disk | FTP | other *** search
- ' ***
- ' *** ------------------------------------------------------------------------------
- ' *** Filename: SCTNortonVirusUpdate.vbs
- ' *** ------------------------------------------------------------------------------
- ' *** Description: Norton Virus Signature Update
- ' *** ------------------------------------------------------------------------------
- ' *** Version: 1.0
- ' *** Notes: Used by Windows Disk Protection
- ' *** ------------------------------------------------------------------------------
- ' *** Copyright (C) Microsoft Corporation 2005, All Rights Reserved
- ' *** ------------------------------------------------------------------------------
- ' ***
-
- ' ~~~
- ' ~~~ Force variables to be declared
- ' ~~~
- Option Explicit
-
- ' ~~~
- ' ~~~ Turn on error handling
- ' ~~~
- On Error Resume Next
-
- ' ~~~
- ' ~~~ Declare global variables
- ' ~~~
- Dim sNortonPath, oShell, strComputer, oWMIService, ColProcesses
-
- ' ~~~ Create objects
- Set oShell = CreateObject("WScript.Shell")
-
- ' ~~~ Set application path
- sNortonPath = oshell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\LUALL.EXE\")
-
- '~~~ Download Virus Signature
- call oShell.Run("""" & sNortonPath & """" & " -s", 0, True)
-
- Do
- strComputer = "."
- Set oWMIService = GetObject("winmgmts:" _
- & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
- Set colProcesses = oWMIService.ExecQuery _
- ("Select * from Win32_Process Where Name = 'LUCOMS~1.EXE'")
-
- Loop Until colProcesses.Count = 0
-
- Set colProcesses = oWMIService.ExecQuery _
- ("Select * from Win32_Process Where Name = 'LUUPDATE.EXE'")
-
- If colProcesses.Count = 0 Then
- Wscript.Sleep(1000)
- Else
- Wscript.Sleep(600000)
- End If
-